CC=arm-linux-gcc
LD=arm-linux-ld
OBJCOPY=arm-linux-objcopy
CC_ARGS= -nostdlib

all: leds_c.bin

test: main.c
	gcc -DDEBUG  -o test main.c

leds_c.bin:start.s main.c
	arm-linux-gcc -nostdlib -c -o start.o start.s
	arm-linux-gcc -O0 -nostdlib -c -o main.o main.c
	arm-linux-ld start.o main.o -o led.elf
	arm-linux-objcopy -O binary -S led.elf led_c.bin
	arm-linux-objdump -d led.elf > led.dump
	$(LML_ADD_4) led_c.bin new.bin 
	
clean:
	rm -rf led.elf led_c.bin new.bin *.o test led.dump

